{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "三、采用5折交叉验证，分别用log似然损失和正确率，对Logistic回归模型的正则超参数调优\n",
    "\n",
    "数据说明： Pima Indians Diabetes Data Set（皮马印第安人糖尿病数据集） 根据现有的医疗信息预测5年内皮马印第安人糖尿病发作的概率。\n",
    "\n",
    "数据集共9个字段: 0列为怀孕次数； 1列为口服葡萄糖耐量试验中2小时后的血浆葡萄糖浓度； 2列为舒张压（单位:mm Hg） 3列为三头肌皮褶厚度（单位：mm） 4列为餐后血清胰岛素（单位:mm） 5列为体重指数（体重（公斤）/ 身高（米）^2） 6列为糖尿病家系作用 7列为年龄 8列为分类变量（0或1）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#导入必要的包\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "      <th>Target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>0.866045</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.166619</td>\n",
       "      <td>0.468492</td>\n",
       "      <td>1.425995</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.205066</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.852200</td>\n",
       "      <td>-0.365061</td>\n",
       "      <td>-0.190672</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>2.016662</td>\n",
       "      <td>-0.693761</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.332500</td>\n",
       "      <td>0.604397</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.073567</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>-0.540642</td>\n",
       "      <td>-0.633881</td>\n",
       "      <td>-0.920763</td>\n",
       "      <td>-1.041549</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>0.504422</td>\n",
       "      <td>-2.679076</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>0.316566</td>\n",
       "      <td>1.549303</td>\n",
       "      <td>5.484909</td>\n",
       "      <td>-0.020496</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.342981</td>\n",
       "      <td>-0.185948</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.997745</td>\n",
       "      <td>-0.818079</td>\n",
       "      <td>-0.275760</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.250952</td>\n",
       "      <td>-1.435189</td>\n",
       "      <td>-1.851862</td>\n",
       "      <td>0.329171</td>\n",
       "      <td>-0.610145</td>\n",
       "      <td>-0.211799</td>\n",
       "      <td>-0.676133</td>\n",
       "      <td>-0.616111</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1.827813</td>\n",
       "      <td>-0.218823</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.414047</td>\n",
       "      <td>-1.020427</td>\n",
       "      <td>-0.360847</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>-0.547919</td>\n",
       "      <td>2.476909</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>1.808882</td>\n",
       "      <td>4.660524</td>\n",
       "      <td>-0.284572</td>\n",
       "      <td>-0.947944</td>\n",
       "      <td>1.681259</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>0.109925</td>\n",
       "      <td>1.953325</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.022590</td>\n",
       "      <td>-0.724455</td>\n",
       "      <td>1.766346</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.046014</td>\n",
       "      <td>-0.383197</td>\n",
       "      <td>1.622439</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.748802</td>\n",
       "      <td>-0.848280</td>\n",
       "      <td>-0.275760</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1.827813</td>\n",
       "      <td>1.523540</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.807020</td>\n",
       "      <td>0.196681</td>\n",
       "      <td>0.064591</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1.827813</td>\n",
       "      <td>0.570172</td>\n",
       "      <td>0.629782</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.779427</td>\n",
       "      <td>2.926869</td>\n",
       "      <td>2.021610</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>2.213910</td>\n",
       "      <td>-1.024647</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>8.170442</td>\n",
       "      <td>-0.342790</td>\n",
       "      <td>-0.223115</td>\n",
       "      <td>2.191785</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.342981</td>\n",
       "      <td>1.457791</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>-1.150541</td>\n",
       "      <td>0.397653</td>\n",
       "      <td>-0.968636</td>\n",
       "      <td>0.347687</td>\n",
       "      <td>1.511083</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.936914</td>\n",
       "      <td>-0.711944</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.357345</td>\n",
       "      <td>0.036615</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>-0.120198</td>\n",
       "      <td>0.960667</td>\n",
       "      <td>2.036530</td>\n",
       "      <td>1.034767</td>\n",
       "      <td>1.942276</td>\n",
       "      <td>0.238963</td>\n",
       "      <td>-0.190672</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.936914</td>\n",
       "      <td>-0.481821</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.415563</td>\n",
       "      <td>-0.658012</td>\n",
       "      <td>-0.190672</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.613320</td>\n",
       "      <td>-3.506291</td>\n",
       "      <td>1.012114</td>\n",
       "      <td>-0.668065</td>\n",
       "      <td>1.578412</td>\n",
       "      <td>-0.872441</td>\n",
       "      <td>-0.020496</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.218823</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>0.101523</td>\n",
       "      <td>-0.517474</td>\n",
       "      <td>0.312165</td>\n",
       "      <td>0.172520</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>-0.250952</td>\n",
       "      <td>0.142800</td>\n",
       "      <td>1.291553</td>\n",
       "      <td>1.353586</td>\n",
       "      <td>1.092686</td>\n",
       "      <td>0.996229</td>\n",
       "      <td>0.701041</td>\n",
       "      <td>-0.531023</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>-0.744819</td>\n",
       "      <td>0.960667</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.428601</td>\n",
       "      <td>-0.253316</td>\n",
       "      <td>1.425995</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.936914</td>\n",
       "      <td>2.444034</td>\n",
       "      <td>1.456996</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>1.069002</td>\n",
       "      <td>-0.063049</td>\n",
       "      <td>0.660206</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1.530847</td>\n",
       "      <td>-0.087324</td>\n",
       "      <td>0.629782</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.502890</td>\n",
       "      <td>-0.630831</td>\n",
       "      <td>-0.360847</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2.124780</td>\n",
       "      <td>0.701671</td>\n",
       "      <td>1.787882</td>\n",
       "      <td>0.442995</td>\n",
       "      <td>0.061720</td>\n",
       "      <td>0.603256</td>\n",
       "      <td>-0.658012</td>\n",
       "      <td>1.511083</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1.827813</td>\n",
       "      <td>0.109925</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>-0.353773</td>\n",
       "      <td>-0.297380</td>\n",
       "      <td>-0.197245</td>\n",
       "      <td>-0.805998</td>\n",
       "      <td>0.660206</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.936914</td>\n",
       "      <td>0.833170</td>\n",
       "      <td>0.298896</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>1.010784</td>\n",
       "      <td>-0.648952</td>\n",
       "      <td>0.830381</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.810569</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-1.605837</td>\n",
       "      <td>-0.007783</td>\n",
       "      <td>-1.347055</td>\n",
       "      <td>0.045675</td>\n",
       "      <td>-0.956462</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2.718712</td>\n",
       "      <td>0.767420</td>\n",
       "      <td>0.795225</td>\n",
       "      <td>-1.150541</td>\n",
       "      <td>-0.355300</td>\n",
       "      <td>-1.492600</td>\n",
       "      <td>-0.685193</td>\n",
       "      <td>2.021610</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0.342981</td>\n",
       "      <td>-0.153073</td>\n",
       "      <td>1.622439</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.239392</td>\n",
       "      <td>-0.407342</td>\n",
       "      <td>0.404942</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>738</th>\n",
       "      <td>-0.547919</td>\n",
       "      <td>-0.744819</td>\n",
       "      <td>-1.024647</td>\n",
       "      <td>-1.378189</td>\n",
       "      <td>0.223895</td>\n",
       "      <td>0.603256</td>\n",
       "      <td>-0.057009</td>\n",
       "      <td>-1.041549</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>739</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.646195</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>1.025338</td>\n",
       "      <td>-0.540228</td>\n",
       "      <td>0.745293</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>740</th>\n",
       "      <td>2.124780</td>\n",
       "      <td>-0.054449</td>\n",
       "      <td>0.629782</td>\n",
       "      <td>0.898290</td>\n",
       "      <td>0.108056</td>\n",
       "      <td>1.432866</td>\n",
       "      <td>0.945671</td>\n",
       "      <td>1.255820</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>741</th>\n",
       "      <td>-0.250952</td>\n",
       "      <td>-0.646195</td>\n",
       "      <td>-2.348190</td>\n",
       "      <td>-1.036717</td>\n",
       "      <td>-0.540642</td>\n",
       "      <td>-0.240908</td>\n",
       "      <td>-0.217075</td>\n",
       "      <td>-0.616111</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>742</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.416071</td>\n",
       "      <td>-1.190090</td>\n",
       "      <td>-1.264365</td>\n",
       "      <td>-0.285796</td>\n",
       "      <td>-0.575663</td>\n",
       "      <td>-0.763716</td>\n",
       "      <td>-0.956462</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>743</th>\n",
       "      <td>1.530847</td>\n",
       "      <td>0.603047</td>\n",
       "      <td>1.787882</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.035628</td>\n",
       "      <td>0.791645</td>\n",
       "      <td>1.000557</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>744</th>\n",
       "      <td>2.718712</td>\n",
       "      <td>1.030419</td>\n",
       "      <td>1.291553</td>\n",
       "      <td>0.898290</td>\n",
       "      <td>-0.007783</td>\n",
       "      <td>1.185439</td>\n",
       "      <td>2.120497</td>\n",
       "      <td>0.490030</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>745</th>\n",
       "      <td>2.421746</td>\n",
       "      <td>-0.711944</td>\n",
       "      <td>0.960667</td>\n",
       "      <td>0.442995</td>\n",
       "      <td>-0.413219</td>\n",
       "      <td>-0.357345</td>\n",
       "      <td>0.048695</td>\n",
       "      <td>1.085644</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>746</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>0.833170</td>\n",
       "      <td>1.787882</td>\n",
       "      <td>1.353586</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>2.451685</td>\n",
       "      <td>-0.343920</td>\n",
       "      <td>-0.531023</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>747</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.336565</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>1.353586</td>\n",
       "      <td>-0.969246</td>\n",
       "      <td>2.015048</td>\n",
       "      <td>1.884928</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>748</th>\n",
       "      <td>-0.250952</td>\n",
       "      <td>2.148161</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>-0.809069</td>\n",
       "      <td>0.687250</td>\n",
       "      <td>0.574147</td>\n",
       "      <td>-0.192914</td>\n",
       "      <td>0.234767</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>749</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>1.326292</td>\n",
       "      <td>-0.859204</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.186955</td>\n",
       "      <td>-0.887541</td>\n",
       "      <td>1.425995</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>750</th>\n",
       "      <td>0.046014</td>\n",
       "      <td>0.471547</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.182690</td>\n",
       "      <td>2.144658</td>\n",
       "      <td>-0.956462</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>751</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.021574</td>\n",
       "      <td>0.464339</td>\n",
       "      <td>1.125938</td>\n",
       "      <td>-0.772320</td>\n",
       "      <td>0.952566</td>\n",
       "      <td>-0.636871</td>\n",
       "      <td>-0.445935</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>752</th>\n",
       "      <td>-0.250952</td>\n",
       "      <td>-0.448946</td>\n",
       "      <td>-0.859204</td>\n",
       "      <td>-0.581421</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.939527</td>\n",
       "      <td>-0.751636</td>\n",
       "      <td>-0.701198</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>753</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>1.950912</td>\n",
       "      <td>1.291553</td>\n",
       "      <td>1.695058</td>\n",
       "      <td>4.278256</td>\n",
       "      <td>1.578412</td>\n",
       "      <td>-0.754656</td>\n",
       "      <td>-0.616111</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>754</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>1.063293</td>\n",
       "      <td>0.464339</td>\n",
       "      <td>0.329171</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.008035</td>\n",
       "      <td>-0.087210</td>\n",
       "      <td>1.000557</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>755</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>0.208549</td>\n",
       "      <td>1.291553</td>\n",
       "      <td>1.125938</td>\n",
       "      <td>-0.355300</td>\n",
       "      <td>0.588702</td>\n",
       "      <td>1.767143</td>\n",
       "      <td>0.319855</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>756</th>\n",
       "      <td>0.936914</td>\n",
       "      <td>0.504422</td>\n",
       "      <td>1.456996</td>\n",
       "      <td>1.353586</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.066254</td>\n",
       "      <td>-0.244256</td>\n",
       "      <td>0.490030</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>757</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>0.044175</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.559592</td>\n",
       "      <td>-0.645932</td>\n",
       "      <td>1.596171</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>758</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.514696</td>\n",
       "      <td>0.298896</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.734247</td>\n",
       "      <td>-0.830159</td>\n",
       "      <td>-0.616111</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>759</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>2.246785</td>\n",
       "      <td>1.622439</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.443156</td>\n",
       "      <td>-0.585529</td>\n",
       "      <td>2.787399</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>760</th>\n",
       "      <td>-0.547919</td>\n",
       "      <td>-1.106442</td>\n",
       "      <td>-1.190090</td>\n",
       "      <td>-0.353773</td>\n",
       "      <td>-1.444185</td>\n",
       "      <td>-0.590218</td>\n",
       "      <td>0.888288</td>\n",
       "      <td>-0.956462</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>761</th>\n",
       "      <td>1.530847</td>\n",
       "      <td>1.589290</td>\n",
       "      <td>0.133453</td>\n",
       "      <td>0.215347</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>1.680294</td>\n",
       "      <td>-0.208015</td>\n",
       "      <td>0.830381</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>762</th>\n",
       "      <td>1.530847</td>\n",
       "      <td>-1.073567</td>\n",
       "      <td>-0.859204</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.448937</td>\n",
       "      <td>-0.996266</td>\n",
       "      <td>-0.020496</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>763</th>\n",
       "      <td>1.827813</td>\n",
       "      <td>-0.679069</td>\n",
       "      <td>0.298896</td>\n",
       "      <td>2.150354</td>\n",
       "      <td>0.455573</td>\n",
       "      <td>0.064737</td>\n",
       "      <td>-0.908682</td>\n",
       "      <td>2.532136</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>764</th>\n",
       "      <td>-0.547919</td>\n",
       "      <td>0.011301</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>-0.239949</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.632365</td>\n",
       "      <td>-0.398282</td>\n",
       "      <td>-0.531023</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>765</th>\n",
       "      <td>0.342981</td>\n",
       "      <td>-0.021574</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>-0.332132</td>\n",
       "      <td>-0.910418</td>\n",
       "      <td>-0.685193</td>\n",
       "      <td>-0.275760</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>766</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>0.142800</td>\n",
       "      <td>-1.024647</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.342790</td>\n",
       "      <td>-0.371101</td>\n",
       "      <td>1.170732</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>767</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-0.942068</td>\n",
       "      <td>-0.197433</td>\n",
       "      <td>0.215347</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.299127</td>\n",
       "      <td>-0.473785</td>\n",
       "      <td>-0.871374</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>768 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "0     0.639947                      0.866045       -0.031990   \n",
       "1    -0.844885                     -1.205066       -0.528319   \n",
       "2     1.233880                      2.016662       -0.693761   \n",
       "3    -0.844885                     -1.073567       -0.528319   \n",
       "4    -1.141852                      0.504422       -2.679076   \n",
       "5     0.342981                     -0.185948        0.133453   \n",
       "6    -0.250952                     -1.435189       -1.851862   \n",
       "7     1.827813                     -0.218823       -0.031990   \n",
       "8    -0.547919                      2.476909       -0.197433   \n",
       "9     1.233880                      0.109925        1.953325   \n",
       "10    0.046014                     -0.383197        1.622439   \n",
       "11    1.827813                      1.523540        0.133453   \n",
       "12    1.827813                      0.570172        0.629782   \n",
       "13   -0.844885                      2.213910       -1.024647   \n",
       "14    0.342981                      1.457791       -0.031990   \n",
       "15    0.936914                     -0.711944       -0.031990   \n",
       "16   -1.141852                     -0.120198        0.960667   \n",
       "17    0.936914                     -0.481821        0.133453   \n",
       "18   -0.844885                     -0.613320       -3.506291   \n",
       "19   -0.844885                     -0.218823       -0.197433   \n",
       "20   -0.250952                      0.142800        1.291553   \n",
       "21    1.233880                     -0.744819        0.960667   \n",
       "22    0.936914                      2.444034        1.456996   \n",
       "23    1.530847                     -0.087324        0.629782   \n",
       "24    2.124780                      0.701671        1.787882   \n",
       "25    1.827813                      0.109925       -0.197433   \n",
       "26    0.936914                      0.833170        0.298896   \n",
       "27   -0.844885                     -0.810569       -0.528319   \n",
       "28    2.718712                      0.767420        0.795225   \n",
       "29    0.342981                     -0.153073        1.622439   \n",
       "..         ...                           ...             ...   \n",
       "738  -0.547919                     -0.744819       -1.024647   \n",
       "739  -0.844885                     -0.646195        0.133453   \n",
       "740   2.124780                     -0.054449        0.629782   \n",
       "741  -0.250952                     -0.646195       -2.348190   \n",
       "742  -0.844885                     -0.416071       -1.190090   \n",
       "743   1.530847                      0.603047        1.787882   \n",
       "744   2.718712                      1.030419        1.291553   \n",
       "745   2.421746                     -0.711944        0.960667   \n",
       "746  -0.844885                      0.833170        1.787882   \n",
       "747  -0.844885                     -1.336565        0.133453   \n",
       "748  -0.250952                      2.148161       -0.197433   \n",
       "749   0.639947                      1.326292       -0.859204   \n",
       "750   0.046014                      0.471547       -0.197433   \n",
       "751  -0.844885                     -0.021574        0.464339   \n",
       "752  -0.250952                     -0.448946       -0.859204   \n",
       "753  -1.141852                      1.950912        1.291553   \n",
       "754   1.233880                      1.063293        0.464339   \n",
       "755  -0.844885                      0.208549        1.291553   \n",
       "756   0.936914                      0.504422        1.456996   \n",
       "757  -1.141852                      0.044175       -0.031990   \n",
       "758  -0.844885                     -0.514696        0.298896   \n",
       "759   0.639947                      2.246785        1.622439   \n",
       "760  -0.547919                     -1.106442       -1.190090   \n",
       "761   1.530847                      1.589290        0.133453   \n",
       "762   1.530847                     -1.073567       -0.859204   \n",
       "763   1.827813                     -0.679069        0.298896   \n",
       "764  -0.547919                      0.011301       -0.197433   \n",
       "765   0.342981                     -0.021574       -0.031990   \n",
       "766  -0.844885                      0.142800       -1.024647   \n",
       "767  -0.844885                     -0.942068       -0.197433   \n",
       "\n",
       "     Triceps_skin_fold_thickness  serum_insulin       BMI  \\\n",
       "0                       0.670643      -0.181541  0.166619   \n",
       "1                      -0.012301      -0.181541 -0.852200   \n",
       "2                      -0.012301      -0.181541 -1.332500   \n",
       "3                      -0.695245      -0.540642 -0.633881   \n",
       "4                       0.670643       0.316566  1.549303   \n",
       "5                      -0.012301      -0.181541 -0.997745   \n",
       "6                       0.329171      -0.610145 -0.211799   \n",
       "7                      -0.012301      -0.181541  0.414047   \n",
       "8                       1.808882       4.660524 -0.284572   \n",
       "9                      -0.012301      -0.181541 -0.022590   \n",
       "10                     -0.012301      -0.181541  0.748802   \n",
       "11                     -0.012301      -0.181541  0.807020   \n",
       "12                     -0.012301      -0.181541 -0.779427   \n",
       "13                     -0.695245       8.170442 -0.342790   \n",
       "14                     -1.150541       0.397653 -0.968636   \n",
       "15                     -0.012301      -0.181541 -0.357345   \n",
       "16                      2.036530       1.034767  1.942276   \n",
       "17                     -0.012301      -0.181541 -0.415563   \n",
       "18                      1.012114      -0.668065  1.578412   \n",
       "19                      0.101523      -0.517474  0.312165   \n",
       "20                      1.353586       1.092686  0.996229   \n",
       "21                     -0.012301      -0.181541  0.428601   \n",
       "22                     -0.012301      -0.181541  1.069002   \n",
       "23                      0.670643      -0.181541 -0.502890   \n",
       "24                      0.442995       0.061720  0.603256   \n",
       "25                     -0.353773      -0.297380 -0.197245   \n",
       "26                     -0.012301      -0.181541  1.010784   \n",
       "27                     -1.605837      -0.007783 -1.347055   \n",
       "28                     -1.150541      -0.355300 -1.492600   \n",
       "29                     -0.012301      -0.181541  0.239392   \n",
       "..                           ...            ...       ...   \n",
       "738                    -1.378189       0.223895  0.603256   \n",
       "739                    -0.012301      -0.181541  1.025338   \n",
       "740                     0.898290       0.108056  1.432866   \n",
       "741                    -1.036717      -0.540642 -0.240908   \n",
       "742                    -1.264365      -0.285796 -0.575663   \n",
       "743                    -0.012301      -0.181541  0.035628   \n",
       "744                     0.898290      -0.007783  1.185439   \n",
       "745                     0.442995      -0.413219 -0.357345   \n",
       "746                     1.353586      -0.181541  2.451685   \n",
       "747                     1.353586      -0.969246  2.015048   \n",
       "748                    -0.809069       0.687250  0.574147   \n",
       "749                    -0.012301      -0.181541 -1.186955   \n",
       "750                    -0.012301      -0.181541 -0.182690   \n",
       "751                     1.125938      -0.772320  0.952566   \n",
       "752                    -0.581421      -0.181541 -0.939527   \n",
       "753                     1.695058       4.278256  1.578412   \n",
       "754                     0.329171      -0.181541 -0.008035   \n",
       "755                     1.125938      -0.355300  0.588702   \n",
       "756                     1.353586      -0.181541 -0.066254   \n",
       "757                    -0.012301      -0.181541  0.559592   \n",
       "758                    -0.012301      -0.181541  0.734247   \n",
       "759                    -0.012301      -0.181541  0.443156   \n",
       "760                    -0.353773      -1.444185 -0.590218   \n",
       "761                     0.215347      -0.181541  1.680294   \n",
       "762                    -0.012301      -0.181541 -1.448937   \n",
       "763                     2.150354       0.455573  0.064737   \n",
       "764                    -0.239949      -0.181541  0.632365   \n",
       "765                    -0.695245      -0.332132 -0.910418   \n",
       "766                    -0.012301      -0.181541 -0.342790   \n",
       "767                     0.215347      -0.181541 -0.299127   \n",
       "\n",
       "     Diabetes_pedigree_function       Age  Target  \n",
       "0                      0.468492  1.425995       1  \n",
       "1                     -0.365061 -0.190672       0  \n",
       "2                      0.604397 -0.105584       1  \n",
       "3                     -0.920763 -1.041549       0  \n",
       "4                      5.484909 -0.020496       1  \n",
       "5                     -0.818079 -0.275760       0  \n",
       "6                     -0.676133 -0.616111       1  \n",
       "7                     -1.020427 -0.360847       0  \n",
       "8                     -0.947944  1.681259       1  \n",
       "9                     -0.724455  1.766346       1  \n",
       "10                    -0.848280 -0.275760       0  \n",
       "11                     0.196681  0.064591       1  \n",
       "12                     2.926869  2.021610       0  \n",
       "13                    -0.223115  2.191785       1  \n",
       "14                     0.347687  1.511083       1  \n",
       "15                     0.036615 -0.105584       1  \n",
       "16                     0.238963 -0.190672       1  \n",
       "17                    -0.658012 -0.190672       1  \n",
       "18                    -0.872441 -0.020496       0  \n",
       "19                     0.172520 -0.105584       1  \n",
       "20                     0.701041 -0.531023       0  \n",
       "21                    -0.253316  1.425995       0  \n",
       "22                    -0.063049  0.660206       1  \n",
       "23                    -0.630831 -0.360847       1  \n",
       "24                    -0.658012  1.511083       1  \n",
       "25                    -0.805998  0.660206       1  \n",
       "26                    -0.648952  0.830381       1  \n",
       "27                     0.045675 -0.956462       0  \n",
       "28                    -0.685193  2.021610       0  \n",
       "29                    -0.407342  0.404942       0  \n",
       "..                          ...       ...     ...  \n",
       "738                   -0.057009 -1.041549       0  \n",
       "739                   -0.540228  0.745293       1  \n",
       "740                    0.945671  1.255820       1  \n",
       "741                   -0.217075 -0.616111       0  \n",
       "742                   -0.763716 -0.956462       0  \n",
       "743                    0.791645  1.000557       1  \n",
       "744                    2.120497  0.490030       0  \n",
       "745                    0.048695  1.085644       0  \n",
       "746                   -0.343920 -0.531023       1  \n",
       "747                    1.884928 -0.105584       0  \n",
       "748                   -0.192914  0.234767       1  \n",
       "749                   -0.887541  1.425995       1  \n",
       "750                    2.144658 -0.956462       1  \n",
       "751                   -0.636871 -0.445935       0  \n",
       "752                   -0.751636 -0.701198       0  \n",
       "753                   -0.754656 -0.616111       1  \n",
       "754                   -0.087210  1.000557       1  \n",
       "755                    1.767143  0.319855       1  \n",
       "756                   -0.244256  0.490030       0  \n",
       "757                   -0.645932  1.596171       1  \n",
       "758                   -0.830159 -0.616111       0  \n",
       "759                   -0.585529  2.787399       1  \n",
       "760                    0.888288 -0.956462       0  \n",
       "761                   -0.208015  0.830381       1  \n",
       "762                   -0.996266 -0.020496       0  \n",
       "763                   -0.908682  2.532136       0  \n",
       "764                   -0.398282 -0.531023       0  \n",
       "765                   -0.685193 -0.275760       0  \n",
       "766                   -0.371101  1.170732       1  \n",
       "767                   -0.473785 -0.871374       0  \n",
       "\n",
       "[768 rows x 9 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#加载原始数据\n",
    "train = pd.read_csv(\"1_FE_pima-indians-diabetes.csv\")\n",
    "train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#数据处理\n",
    "from scipy.sparse import csr_matrix\n",
    "y_train = train['Target']   \n",
    "X_train = train.drop(\"Target\", axis=1)\n",
    "\n",
    "#保存特征名字以备后用（可视化）\n",
    "feat_names = X_train.columns \n",
    "\n",
    "#sklearn的学习器大多之一稀疏数据输入，模型训练会快很多\n",
    "#将数据转换成稀疏矩阵，提升模型训练速度\n",
    "X_train = csr_matrix(X_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "正则化的 Logistic Regression及参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=5, error_score='raise',\n",
       "       estimator=LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1,\n",
       "          penalty='l2', random_state=None, solver='liblinear', tol=0.0001,\n",
       "          verbose=0, warm_start=False),\n",
       "       fit_params=None, iid=True, n_jobs=4,\n",
       "       param_grid={'penalty': ['l1', 'l2'], 'C': [0.01, 0.1, 1, 10, 100, 1000, 10000]},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=0)"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入包\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "#参数调优\n",
    "penaltys = ['l1','l2']\n",
    "Cs = [ 0.01,0.1, 1, 10, 100, 1000,10000]\n",
    "tuned_parameters = dict(penalty = penaltys, C = Cs)\n",
    "#初始化LogisticRegression\n",
    "lr_penalty= LogisticRegression(solver='liblinear')\n",
    "#GridSearchCV参数调优，使用log似然损失对logistic回归模型的正则参数调优，采用五折交叉验证\n",
    "grid= GridSearchCV(lr_penalty, tuned_parameters,cv=5, scoring='neg_log_loss',n_jobs = 4,)\n",
    "#训练模型\n",
    "grid.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_score -> 0.47602528203246314\n",
      "best_params -> {'C': 1, 'penalty': 'l1'}\n"
     ]
    }
   ],
   "source": [
    "#打印最佳参数和best score\n",
    "print(\"best_score ->\",-grid.best_score_)\n",
    "print(\"best_params ->\", grid.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/jingxijun/anaconda3/lib/python3.6/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/jingxijun/anaconda3/lib/python3.6/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8nVWd9/3Pd+8kPZee0ib0QAsWaJtAlQgoyHAQSKsDKCAwjoKOVueW25lxhhFmvPEW1NGZ+7l1fF48yEFOI1oQRCq0lIMUkOHQgIWeKJQCEtrS0lIo9JAm+T1/7CtlE3LYzc7OzuH7fr2uV/Zee621f6u0+X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8BsYjUYc/w2cEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot cv误差曲线\n",
    "test_means = grid.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "n_Cs = len(Cs)\n",
    "number_penaltys = len(penaltys)\n",
    "test_scores = np.array(test_means).reshape(n_Cs,number_penaltys)\n",
    "train_scores = np.array(train_means).reshape(n_Cs,number_penaltys)\n",
    "test_stds = np.array(test_stds).reshape(n_Cs,number_penaltys)\n",
    "train_stds = np.array(train_stds).reshape(n_Cs,number_penaltys)\n",
    "\n",
    "x_axis = np.log10(Cs)\n",
    "for i, value in enumerate(penaltys):\n",
    "    plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i] ,label = penaltys[i] +' Test')\n",
    "   \n",
    "plt.legend()\n",
    "plt.xlabel( 'log(C)' )                                                                                                      \n",
    "plt.ylabel( 'logloss' )\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_score -> -0.7747395833333334\n",
      "best_params -> {'C': 0.1, 'penalty': 'l2'}\n"
     ]
    }
   ],
   "source": [
    "#使用正确率评价模型性能\n",
    "#GridSearchCV参数调优，使用正确率对logistic回归模型的正则参数调优，采用五折交叉验证\n",
    "grid= GridSearchCV(lr_penalty, tuned_parameters,cv=5, scoring='accuracy',n_jobs = 4,)\n",
    "grid.fit(X_train,y_train)\n",
    "print(\"best_score ->\",-grid.best_score_)\n",
    "print(\"best_params ->\", grid.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/jingxijun/anaconda3/lib/python3.6/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/jingxijun/anaconda3/lib/python3.6/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8nVWd9/3Pd+8kPZee0ib0QAsWaJtAlQgoyHAQSKsDKCAwjoKOVueW25lxhhFmvPEW1NGZ+7l1fF48yEFOI1oQRCq0lIMUkOHQgIWeKJQCEtrS0lIo9JAm+T1/7CtlE3LYzc7OzuH7fr2uV/Zee621f6u0+XGt67rWUkRgZmbWValiB2BmZn2bE4mZmeXFicTMzPLiRGJmZnlxIjEzs7w4kZiZWV4Kmkgk1UpaI2mtpIvbqfM5SaskrZT0q6zyJknLkmNBVvk0SU9IekHSLZLKCjkGMzPrmAr1HImkNPA8cDJQDywFzouIVVl1pgO3AidGxJuSxkfEpuSzdyJieBv93gr8NiLmS/o58ExEXFmQQZiZWacKeUZyJLA2ItZFRAMwHzi9VZ2vAldExJsALUmkPZIEnAjclhTdCJzRrVGbmdk+KSlg3xOBV7Pe1wNHtapzMICkR4E08L8j4p7ks8GS6oBG4EcR8TtgLLAtIhqz+pzYWSDjxo2LqVOndnUcZmYD0lNPPfVGRJR3Vq+QiURtlLWeRysBpgPHA5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lhcnEjMzy4sTiZmZ5cWJxMzM8uJEYtYNJL3Tea0O298m6cDk9XBJV0l6MVm59WFJR0kqS177QWLrVZxIzIpM0iwgHRHrkqJrySyCOD0iZgEXAOOSxR0fAM4pSqBm7XAiMetGyviPZE2w5ZLOScpTkv6/5AzjLkkLJZ2VNPs8cGdS7yDgKOA7EdEMkKwQfHdS93dJfbNew6fIZt3rs8Bs4HAyT3ovlfQwcAwwFagGxpNZovy6pM0xwK+T17PIPKXf1E7/K4CPFiRysy7yGYlZ9zoW+HWy8urrwENkfvEfC/wmIpojYiPwYFabSmBzLp0nCaYh2XjJrFdwIjHrXm0tD99ROcBOYHDyeiVwuKSO/m0OAnZ1ITazgnAiMeteDwPnJJsKlQPHAU+S2er0zORayQQyixy2WA18CCAiXgTqgO8lq9EiaXrLHiySxgKbI2JPTw3IrDNOJGbd6w7gWeAZ4A/APydTWbeT2YNkBZl95p8A3kra3M37E8tXgApgraTlwDW8t1fJCUCfW43W+jev/mvWQyQNj4h3krOKJ4FjImJjsl/Eg8n79i6yt/TxW+CSPr5fvfUzvmvLrOfclWw2VAZcnpypEBE7JX2XzJ7tf26vcbIB1u+cRKy38RmJmZnlxddIzMwsL04kZmaWFycSMzPLixOJmZnlxYnEzMzy4kRiZmZ5+f8BsYjUYc/w2cEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot CV误差曲线\n",
    "test_means = grid.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "n_Cs = len(Cs)\n",
    "number_penaltys = len(penaltys)\n",
    "test_scores = np.array(test_means).reshape(n_Cs,number_penaltys)\n",
    "train_scores = np.array(train_means).reshape(n_Cs,number_penaltys)\n",
    "test_stds = np.array(test_stds).reshape(n_Cs,number_penaltys)\n",
    "train_stds = np.array(train_stds).reshape(n_Cs,number_penaltys)\n",
    "\n",
    "x_axis = np.log10(Cs)\n",
    "for i, value in enumerate(penaltys):\n",
    "    plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i] ,label = penaltys[i] +' Test')\n",
    "   \n",
    "plt.legend()\n",
    "plt.xlabel( 'log(C)' )                                                                                                      \n",
    "plt.ylabel( 'logloss' )\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用LogisticRegressionCV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegressionCV(Cs=[0.001, 0.01, 0.1, 1, 10, 100, 1000],\n",
       "           class_weight=None, cv=5, dual=False, fit_intercept=True,\n",
       "           intercept_scaling=1.0, max_iter=100, multi_class='ovr',\n",
       "           n_jobs=4, penalty='l1', random_state=None, refit=True,\n",
       "           scoring='neg_log_loss', solver='liblinear', tol=0.0001,\n",
       "           verbose=0)"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入数据包\n",
    "from sklearn.linear_model import LogisticRegressionCV\n",
    "#设置正则参数范围\n",
    "Cs = [1e-3, 1e-2, 1e-1, 1, 10, 100, 1000]\n",
    "#LogisticRegressionCV参数调优，使用了l1正则 log似然损失 对logistic回归模型的正则参数调优，采用五折交叉验证\n",
    "lrcv_L1 = LogisticRegressionCV(Cs=Cs, cv = 5, scoring='neg_log_loss', penalty='l1', solver='liblinear', multi_class='ovr',n_jobs=4)\n",
    "#训练模型\n",
    "lrcv_L1.fit(X_train, y_train)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAl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M4JJblIH2jPQqRvzgUeCu74uQt4mtSX+7nA/3X3pLvvBJ7qtM54oCmTNw9KpDUYnEckcioLkb7p7vbjPc0HOAaUBc/XA7Vm1tN/g6XA8T5kExlwKguRvnkG+HQw8EwV8GFgBalhLS8Pzl2MJXXjvRM2AqcDuPurQCPwreAuqJjZlBNjeJjZKUCTu7cN1gaJ9ERlIdI3vwZeANYCvwf+ITjs9EtvZw4kAAAAoklEQVRS41i8SGrc8OeAg8E6j/Hu8rgeGAdsNrN1wF28M97FR4Gcuwuq5C/ddVZkgJnZMHc/EuwdrADmufvOYLyBp4Lpk53YPvEevwK+nsPjj0ue0dVQIgPv0WBAmhLgtmCPA3c/Zma3kBqH+82TrRwMlLRYRSHZRHsWIiKSls5ZiIhIWioLERFJS2UhIiJpqSxERCQtlYWIiKSlshARkbT+P2cxA1ShAQ1tAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#用图显示log似然损失和正则系数的关系\n",
    "n_Cs = len(Cs)\n",
    "scores =  np.zeros(n_Cs)\n",
    "scores_vakue = lrcv_L1.scores_[1]\n",
    "#scores= np.mean(scores_vakue[j],axis = 0)\n",
    "mse_mean = -np.mean(scores_vakue, axis = 0)\n",
    "plt.plot(np.log10(Cs), mse_mean.reshape(n_Cs,1))  \n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegressionCV(Cs=[0.001, 0.01, 0.1, 1, 10, 100, 1000],\n",
       "           class_weight=None, cv=5, dual=False, fit_intercept=True,\n",
       "           intercept_scaling=1.0, max_iter=100, multi_class='ovr',\n",
       "           n_jobs=4, penalty='l1', random_state=None, refit=True,\n",
       "           scoring='accuracy', solver='liblinear', tol=0.0001, verbose=0)"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#LogisticRegressionCV参数调优，使用了l1正则 正确率 对logistic回归模型的正则参数调优，采用五折交叉验证\n",
    "lrcv_L1 = LogisticRegressionCV(Cs=Cs, cv = 5, scoring='accuracy', penalty='l1', solver='liblinear', multi_class='ovr',n_jobs=4)\n",
    "lrcv_L1.fit(X_train, y_train)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8VPW9//HXh4SwiiAkqOxLINDWNVJ3BUXR3mpXC11tq7S2WmurVWt/t/fa0k3vtZvtrbW2tbeV2mott6CILG6VQigoQhIIIBAQEvY1ZPv8/pgTOoSEmSRzciaT9/PxyKNzznzP5HOqzjtn+ZyvuTsiIiIn0iXqAkREJP0pLEREJCGFhYiIJKSwEBGRhBQWIiKSkMJCREQSUliIiEhCCgsREUlIYSEiIgllR11AqgwYMMCHDx8edRkiIh3KsmXLdrh7bqJxGRMWw4cPp6ioKOoyREQ6FDPbmMw4nYYSEZGEFBYiIpKQwkJERBJSWIiISEIKCxERSUhhISIiCSksREQkoYzpsxBJRxt2HOTF0goOHKmle9cseuZk0zMnix45WfTomtXodfbR1znZ+jtO0ovCQiSFqmvrWbJhFwtKKlhYWsGGHQdb9TnZXaxRoGTTo2uXo4HSM3jv2NfZzawPgihufdcshZG0jMJCpI0q9lexqKSS+SXbeWXtDg5W15GT3YULRvbnxguHM6kgj4F9unO4uo7DNXUcqq7lUHUdVTV1HKqua/S6tpn1dRyuqeVQdS07DhzhcE1d7POq6zhU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UjXLEREJCGFhYiIJKSwEBGRhBQWIiKSkMJCREQSUliIiEhC/x8Qi3gWc0+P8QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#用图显示正确率和正则系数的关系\n",
    "Cs = [1e-3, 1e-2, 1e-1, 1, 10, 100, 1000]\n",
    "n_Cs = len(Cs)\n",
    "scores =  np.zeros(n_Cs)\n",
    "scores_vakue = lrcv_L1.scores_[1]\n",
    "mse_mean = np.mean(scores_vakue, axis = 0)\n",
    "plt.plot(np.log10(Cs), mse_mean.reshape(n_Cs,1))  \n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('accuracy')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
